package com.ruoyi.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.TbOrderDetailsMapper;
import com.ruoyi.order.domain.TbOrderDetails;
import com.ruoyi.order.service.ITbOrderDetailsService;

/**
 * 订单详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-07
 */
@Service
public class TbOrderDetailsServiceImpl implements ITbOrderDetailsService 
{
    @Autowired
    private TbOrderDetailsMapper tbOrderDetailsMapper;

    /**
     * 查询订单详情
     * 
     * @param id 订单详情主键
     * @return 订单详情
     */
    @Override
    public TbOrderDetails selectTbOrderDetailsById(Long id)
    {
        return tbOrderDetailsMapper.selectTbOrderDetailsById(id);
    }

    /**
     * 查询订单详情列表
     * 
     * @param tbOrderDetails 订单详情
     * @return 订单详情
     */
    @Override
    public List<TbOrderDetails> selectTbOrderDetailsList(TbOrderDetails tbOrderDetails)
    {
        return tbOrderDetailsMapper.selectTbOrderDetailsList(tbOrderDetails);
    }

    /**
     * 新增订单详情
     * 
     * @param tbOrderDetails 订单详情
     * @return 结果
     */
    @Override
    public int insertTbOrderDetails(TbOrderDetails tbOrderDetails)
    {
        return tbOrderDetailsMapper.insertTbOrderDetails(tbOrderDetails);
    }

    /**
     * 修改订单详情
     * 
     * @param tbOrderDetails 订单详情
     * @return 结果
     */
    @Override
    public int updateTbOrderDetails(TbOrderDetails tbOrderDetails)
    {
        return tbOrderDetailsMapper.updateTbOrderDetails(tbOrderDetails);
    }

    /**
     * 批量删除订单详情
     * 
     * @param ids 需要删除的订单详情主键
     * @return 结果
     */
    @Override
    public int deleteTbOrderDetailsByIds(Long[] ids)
    {
        return tbOrderDetailsMapper.deleteTbOrderDetailsByIds(ids);
    }

    /**
     * 删除订单详情信息
     * 
     * @param id 订单详情主键
     * @return 结果
     */
    @Override
    public int deleteTbOrderDetailsById(Long id)
    {
        return tbOrderDetailsMapper.deleteTbOrderDetailsById(id);
    }

    //我的订单详情
    @Override
    public List<TbOrderDetails> selectTbOrderIdDetailsList(Integer orderId) {
//        tbOrderDetailsMapper.
        return null;
    }
}
